home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / utility / 95 / pascal / filexfer.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-01-15  |  976 b   |  43 lines

  1. PROGRAM filexfer;
  2.  
  3. { Take lines from an input file and place them in an output file }
  4.  
  5.   CONST
  6.     {$I gemconst.pas }
  7.  
  8.   TYPE
  9.     {$I gemtype.pas }
  10.  
  11.   VAR
  12.     ifile       :       file of TEXT;
  13.     ofile       :       file of TEXT;
  14.     istring     :       STRING;
  15.     ipath       :       Path_Name;
  16.     iname       :       Path_Name;
  17.     oname       :       Path_Name;
  18.  
  19.   {$I gemsubs.pas }
  20.  
  21. BEGIN
  22.   IF Init_Gem >= 0 then
  23.     BEGIN
  24.       ipath := 'A:\*.*';
  25.       iname := '';
  26.       If Get_In_File( ipath, iname ) THEN
  27.         BEGIN
  28.           RESET( ifile, iname );
  29.           oname := '';
  30.           If Get_Out_File( 'Write to ...', oname ) THEN
  31.             BEGIN
  32.               REWRITE ( ofile, oname );
  33.               WHILE NOT( EOF( ifile )) do
  34.                 BEGIN
  35.                   READLN( ifile, istring );
  36.                   WRITELN( ofile, istring );
  37.                 END;
  38.             END;
  39.         END;
  40.       Exit_Gem;
  41.     END;
  42. END.
  43.